package com.javafactroy.kunlong.common.dto;

import cn.hutool.core.util.StrUtil;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class RedisKeyDto {
    String app;
    String userId;
    String key;

    public RedisKeyDto(){
        app="dbagent";
        userId="111";
    }

    public String fullKey() {
        return StrUtil.format("{}:{}:{}", app, userId, key);
    }

    public String fullKey(String key) {
        return StrUtil.format("{}:{}", app,  key);
    }
}
